import request from '@/utils/request'
import cache from "@/plugins/cache";

// 查询数据回显值列表
export function listSubinfo(query) {
  return request({
    url: '/system/subinfo/list',
    method: 'get',
    params: query
  })
}

// 查询数据回显值详细
export function getSubinfo(id) {
  return request({
    url: '/system/subinfo/' + id,
    method: 'get'
  })
}

// 新增数据回显值
export function addSubinfo(data) {
  return request({
    url: '/system/subinfo',
    method: 'post',
    data: data
  })
}

// 修改数据回显值
export function updateSubinfo(data) {
  return request({
    url: '/system/subinfo',
    method: 'put',
    data: data
  })
}

// 删除数据回显值
export function delSubinfo(id) {
  return request({
    url: '/system/subinfo/' + id,
    method: 'delete'
  })
}

// 获取字典选择框列表
export function getSubOptionSelect() {
  return request({
    url: '/system/subinfo/subAllList',
    method: 'get'
  })
}

export function getDbName() {
  return cache.local.get("currentProject");
}
